# install httpd
yum install httpd
# vim /etc/httpd/conf/httpd.conf and change ServerName
# ServerName www.example.com:80
service httpd start
chkconfig --levels 235 httpd on


# install mysql
yum install mysql-server
chkconfig --levels 235 mysqld on
mysqladmin -u root password '123654ax'



# 1) install php54
yum install centos-release-SCL
yum install php54 php54-php php54-php-gd php54-php-mbstring
yum install php54-php-mysqlnd


# if you have install old php version
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php53.off


# restart httpd
service httpd restart


# 2) install php54
# check if any old php version has been installed.
yum list installed | grep php
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 
yum remove php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64


# for CentOS 5.x
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpmOr
# for CentOS 6.x: 
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

# check if there is object version
yum list available | grep php
# Or, version specific search: 
yum list available | grep php54

yum install php54w.x86_64 php54w-cli.x86_64 php54w-common.x86_64 php54w-gd.x86_64 php54w-ldap.x86_64 
yum install php54w-mbstring.x86_64 php54w-mcrypt.x86_64 php54w-mysql.x86_64 php54w-pdo.x86_64

# check version
php -v


# create database shadowsocks
CREATE DATABASE shadowsocks DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


# rewrite modify
# vim /etc/httpd/conf/httpd.conf
# AllowOverride None改为AllowOverride ALL